@extends('Index/vip/vip_base')
@section('con-right')
	<div class="pull-right">
			<div class="user-content__box clearfix bgf">
				<div class="title">订单中心-订单支付</div>
				<div class="order-info__box">
					<div class="step-flow-box" style="width: 800px;margin: 0 auto 24px">
						<div class="step-flow__bd">
							<div class="step-flow__li step-flow__li_done">
								<div class="step-flow__state"><i class="iconfont icon-ok"></i></div>
								<p class="step-flow__title-top">拍下商品</p>
							</div>
							<div class="step-flow__line step-flow__line_ing">
								<div class="step-flow__process"></div>
							</div>
							<div class="step-flow__li step-flow__li_ing">
								<div class="step-flow__state"><i class="iconfont icon-ok"></i></div>
								<p class="step-flow__title-top">付款</p>
							</div>
							<div class="step-flow__line step-flow__li_ing">
								<div class="step-flow__process"></div>
							</div>
							<div class="step-flow__li step-flow__li_ing">
								<div class="step-flow__state"><i class="iconfont icon-ok"></i></div>
								<p class="step-flow__title-top">卖家发货</p>
							</div>
							<div class="step-flow__line step-flow__li_ing">
								<div class="step-flow__process"></div>
							</div>
							<div class="step-flow__li step-flow__li_ing">
								<div class="step-flow__state"><i class="iconfont icon-ok"></i></div>
								<p class="step-flow__title-top">买家确认收货</p>
							</div>
						</div>
					</div>
					<!-- <p class="fz18 cr">我已收到货，同意付款。</p> -->
					<div class="table-thead">
						<div class="tdf3">商品</div>
						<div class="tdf1">数量</div>
						<div class="tdf1">单价</div>
						<div class="tdf2">优惠</div>
						<div class="tdf1">总价</div>
						<div class="tdf1">运费</div>
					</div>
					<div class="order-item__list">
					@foreach($goods as $list)
						<div class="item">
							<div class="tdf3">
								<a href="/index/webpage/item_show?id={{$list->id}}"><div class="img"><img src="/upload/{{$list->img}}" alt="" class="cover"></div>
								<div class="ep2 c6">{{$list->name}}</div></a>
								<div class="attr ep">颜色分类：{{$list->color}}  尺码：{{$list->size}}</div>
							</div>
							<div class="tdf1">{{$list->num}}</div>
							<div class="tdf1">{{number_format($list->price,2)}}</div>
							<div class="tdf2">
								无
							</div>
							<div class="tdf1">{{number_format($list->price*$list->num,2)}}</div>
							<div class="tdf1">
								<div class="ep2">快递<br>¥0.00</div>
							</div>
						</div>
					@endforeach
					</div>
					<div class="price-total">
						<div class="fz12 c9">未使用优惠券<br>快递运费 ￥0.0</div>
						<div class="fz18 c6">实付款：<b class="cr">¥{{$order->cost}}</b></div>
						<div class="fz12 c9">（本单可获 <span class="c6">380</span> 积分）</div>
					</div>
					<hr>
					<div class="order-info">
						订单编号：<span class="c6">{{$order->o_id}}</span><br>
						支付宝交易号：<span class="c6">165454564564165164654654</span><br>
						收货地址：<span class="c6">{{$order->address}}</span><br>
						成交时间：<span class="c6">{{$order->date}}</span>
					</div>
					<div class="modify_div clearfix">
						<form action="/index/order/order_paydone" method="post" class="user-setting__form" role="form">
							<div class="form-group">
								<label form="pay-pwd" class="iptut-box-nick posr">
									<span class="cr">支付密码：</span>
									<input type="password" id="pay-pwd" maxlength="6">
									<input type="hidden" name="o_id" value="{{$order->o_id}}">
									<div class="iptut-fake-box"></div>
									<p style="font-weight: normal">请输入6位数字支付密码</p>
								</label>
							</div>
							<div class="form-group" style="line-height: 1em">
								<div class="col-sm-offset-2 col-sm-10">
									<button type="submit" class="but">确认支付</button>
								</div>
							</div>
							<script>
								$(document).ready(function(){
									var teml = '<div class="pwd-digit"></div>',
										$fake_box = $('.iptut-fake-box');
									$fake_box.empty().html(teml + teml + teml + teml + teml + teml)
									$fake_box.html()
									$('#pay-pwd').bind('input propertychange focus',function() {
										$fake_box.empty();
										for (var i = 0; i < 6; i++) {
											var $temp = $(teml);
											if ($(this).val().length > i) {
												$temp.addClass('active')
											};
											if ($(this).val().length == i) {
												$temp.addClass('current')
											};
											$fake_box.append($temp);
										}
									});
									$('#pay-pwd').bind('blur',function() {
										$fake_box.find('.pwd-digit').removeClass('current');
									});
								});
								$('.user-setting__form').submit(function(){
									if($('#pay-pwd').val().length==6){
										layer.msg('支付成功',{icon:1});
										// setTimeout(function(){
										// 	window.loaction.href="/index/order/udai_order";
										// },1000);
									}else{
										return false;
									}
									

								})
							</script>
						</form>
					</div>
				</div>
			</div>
	</div>
@endsection